import { Iterator } from "./Iterator";
import { User } from "./User";

export interface IUserCollection {
    getList: () => any
    
}

export class UserCollection implements IUserCollection {
    users: User[] = [];
    addFirend(user: User) {
        this.users.push(user);
    }

    createIterator() {
        return new Iterator(this)
    }

    getList() {
        return this.users;
    };
}